<?php 
	//odkaz veduci na listing userov (akcia admin_list)
	//'admin' => true znamena, ze v url sa pouzije prefix "admin" a zavila sa akcia s tymto preffixom, cize "admin" + "list" = "admin_list"
	// http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::link
	$tmp = $this->Html->link('Späť', array('admin' => true, 'controller' => 'departments', 'action' => 'list'));
  	echo str_replace('Späť', '<button class="bold rounded bordered gradient">Späť</button>', $tmp);
?>

<h1>Upraviť katedru</h1>

<div id="detail">
<?php 

	// http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html
	// http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html#editing-posts
    echo $this->Form->create('Department', array('action' => 'edit'));
    echo $this->Form->input('id', array('type' => 'hidden'));
    echo $this->Form->input('name', array('label' => 'Skratka', 'div' => 'input-text'));
    echo $this->Form->input('fullname', array('label' => 'Názov', 'div' => 'input-text'));
    echo '<br />'.$this->Form->button('Uložiť', array('type' => 'submit', 'class' => 'bold rounded bordered gradient'));
    echo $this->Form->end();
?>
</div>